% % File		:	verity/ppg_0_1_display
% % Description	:   for Heart Rate Algorithm
% % Fuction		:	PPG signal display
% % Author		:	@hiyangdong
% % Version		:	V0.1
% % Time		:	12 Jan. 2016

%{
 1.0.1 read data and orignal calculate
%}
% close all
clear all

ExcelName = 'ppg_RawData.xlsx';
ExcelSheet = 2;

data_type = 8;
data_sheet_max = 14;
time_length = 60;
data_length  = time_length * 100;

data.all = zeros(data_type,data_length,data_sheet_max);

for i = 1:data_type
	xlRange_code = ['A'+i-1,':','A'+i-1];
    xlRange = char(xlRange_code);
    data.all(i,:,ExcelSheet) = xlsread(ExcelName,ExcelSheet,xlRange);
end

ppg_data = data.all(2,:,ExcelSheet);
ppg_size = length(ppg_data);
sampletime = 0.01                               %sample time that unit is second
t = 0:sampletime:(ppg_size-1) * sampletime;     %time point

figure(1);clf();
plot(t,ppg_data,'k');
title('Time domain orignal PPG data');

disp('end');